@extends('admin.common.app')
@section('css')
    <link rel="stylesheet" href="/admin/css/pagination.css">
@endsection
@section('cont')
    <section class="Hui-article-box">
        <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
            <span class="c-gray en">&gt;</span>
            学生中心
            <span class="c-gray en">&gt;</span>
            导出学生信息 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
                <i class="Hui-iconfont">&#xe68f;</i>
            </a>
        </nav>
        <div class="Hui-article">
            <article class="cl pd-20">
                <form action="" method="'get" class="text-c"> 班级名称：
                    <input type="text" class="input-text" style="width:250px" placeholder="输入班级名称" id="" name="class_name">
                    <button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜班级</button>
                </form>
                <div class="cl pd-5 bg-1 bk-gray mt-20">
                    <form action="" method="POST" c>
                        @csrf
                             <input class="btn btn-primary radius" type="submit" value="&#xe644; 导出学生信息">
                    </form>
                </div>
                @include('admin.common.msg')
                <table class="table table-border table-bordered table-bg">
                    <thead>
                    <tr>
                        <th scope="col" colspan="9">学生列表</th>
                    </tr>
                    <tr class="text-c">
                        <th width="20">ID</th>
                        <th width="50">学号</th>
                        <th width="50">姓名</th>
                        <th width="20">性别</th>
                        <th width="80">班级</th>
                        <th width="100">手机号</th>
                        <th width="100">邮箱</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($data as $item)
                        <tr class="text-c">
                            <td>{{$item->id}}</td>
                            <td>{{$item->student_code}}</td>
                            <td>{{$item->name}}</td>
                            <td>
                                @if($item['sex']=='未知')
                                    <span class="label label-danger radius"> {{$item->sex}}</span>
                                @elseif($item['sex']=='女生')
                                    <span class="label label-success radius"> {{$item->sex}}</span>
                                @else
                                    <span class="label label-secondary radius"> {{$item->sex}}</span>
                                @endif
                            </td>
                            <td>{{$item->class_name}}</td>
                            <td>{{$item->phone}}</td>
                            <td>{{$item->email}}</td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
                {{$data->links()}}
            </article>
        </div>
    </section>
@endsection
@section('js')

@endsection
